package com.ts.api.module.api.service.impl;

import com.ts.api.module.api.dao.ApiKeyDao;
import com.ts.api.module.api.entity.po.ApiKeyPO;
import com.ts.api.module.api.entity.qo.ApiKeyQO;
import com.ts.api.module.api.service.ApiKeyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class ApiKeyServiceImpl implements ApiKeyService {

    @Autowired
    private ApiKeyDao apiKeyDao;

    @Override
    public ApiKeyPO getByClientId(String apiClientId) {
        return apiKeyDao.getByClientId(apiClientId);
    }

    @Override
    @Transactional(readOnly = true)
    public List<ApiKeyPO> list(ApiKeyQO apiKeyQO) {
        return apiKeyDao.list(apiKeyQO);
    }

}
